Skip to content

feat(cli): cdk init supports custom project names with --project name, -n option #1006

Merged
mrgrain merged 3 commits intoaws:mainfrom
alias-rahil:feat/cli-init-name-option
Jan 12, 2026
Merged

feat(cli): cdk init supports custom project names with --project name, -n option #1006
mrgrain merged 3 commits intoaws:mainfrom
alias-rahil:feat/cli-init-name-option

Conversation

@alias-rahil
Copy link
Contributor

@alias-rahil alias-rahil commented Dec 25, 2025

Fixes #990


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team December 25, 2025 21:01
@alias-rahil alias-rahil changed the title feat(cli): add --name option to cdk init (#990) feat(cli): add --name option to cdk init Dec 25, 2025
auto-merge was automatically disabled December 25, 2025 21:52

Head branch was pushed to by a user without write access

@alias-rahil alias-rahil force-pushed the feat/cli-init-name-option branch from 90acec1 to de1a9a9 Compare December 25, 2025 21:52
@mrgrain mrgrain changed the title feat(cli): add --name option to cdk init feat(cli): cdk init allows setting custom project name with new --name option Jan 12, 2026
@codecov-commenter
Copy link

codecov-commenter commented Jan 12, 2026

Codecov Report

❌ Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.72%. Comparing base (4813f35) to head (0278ed4).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/aws-cdk/lib/cli/cli.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1006   +/-   ##
=======================================
  Coverage   87.72%   87.72%           
=======================================
  Files          72       72           
  Lines       10077    10087   +10     
  Branches     1327     1330    +3     
=======================================
+ Hits         8840     8849    +9     
- Misses       1212     1213    +1     
  Partials       25       25           
Flag Coverage Δ
suite.unit 87.72% <91.66%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mrgrain mrgrain changed the title feat(cli): cdk init allows setting custom project name with new --name option feat(cli): cdk init allows setting custom project name with new -n, --project name option Jan 12, 2026
@mrgrain mrgrain changed the title feat(cli): cdk init allows setting custom project name with new -n, --project name option feat(cli): cdk init allows setting custom project name with new --project name, -n option Jan 12, 2026
@mrgrain mrgrain enabled auto-merge January 12, 2026 12:45
@mrgrain mrgrain changed the title feat(cli): cdk init allows setting custom project name with new --project name, -n option feat(cli): cdk init supports custom project names with --project name, -n option Jan 12, 2026
@mrgrain mrgrain added this pull request to the merge queue Jan 12, 2026
Merged via the queue into aws:main with commit 29249ac Jan 12, 2026
38 of 40 checks passed
@alias-rahil alias-rahil deleted the feat/cli-init-name-option branch January 12, 2026 19:30
expect(Object.entries(pj.devDependencies)).toContainEqual(['aws-cdk-lib', '2.100']);
});

cliTest('can specify project name with --name option', async (workDir) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be

cliTest('can specify project name with --project-name option', async (workDir) => {

instead of

cliTest('can specify project name with --name option', async (workDir) => {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(init): provide an option to pass project name in cdk init

3 participants